/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package controls;

import java.sql.*;

/**
 *
 * @author Ahm
 */
public class SQLConnection {
public Statement komut;
    public Statement GetUserTableConnection() {
        try {
            Class.forName("com.mysql.jdbc.Driver").newInstance();
          //local
            Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/fuclub", "root", "ahmet");
          //gerçek
           // Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/yazilimkulubu_com_FuWeb", "FuWebRoot", "2334.@MaG-el");
            komut = con.createStatement();

        } catch (Exception e) {
        }

        return komut;
    }
    public Statement GetProfilTableConnection() {
        try {
            Class.forName("com.mysql.jdbc.Driver").newInstance();
          //gerçek
           //Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/yazilimkulubu_com_FuWeb", "FuWebRoot", "2334.@MaG-el");

            //LOCAL:
              Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/fuclub", "root", "ahmet");
            komut = con.createStatement();

        } catch (Exception e) {
        }

        return komut;
    }

    public Statement GetDiscoussionConnection() {
        try {
            Class.forName("com.mysql.jdbc.Driver").newInstance();
            //LOCAL
            Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/fuClub", "root", "ahmet");
            //gerçek
            //Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/yazilimkulubu_com_FuWeb", "FuWebRoot", "2334.@MaG-el");
          
            komut = con.createStatement();

        } catch (Exception e) {
        }

        return komut;
    }



}
